package com.pan.test.entity.po;

import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.Date;
import com.pan.test.entity.enums.DateTimePatternEnum;
import com.pan.test.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;


/**
 * 管理员用户表
 */
public class Adminuser implements Serializable {


	/**
	 * 管理员用户
	 */
	private String email;

	/**
	 * 管理员密码
	 */
	private String password;

	/**
	 * 最后登录时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date logintime;

	/**
	 * 邀请码
	 */
	private String invitationcode;

	/**
	 * 用户状态，1：启用该管理员 0：禁用管理员
	 */
	private Integer state;


	public void setEmail(String email){
		this.email = email;
	}

	public String getEmail(){
		return this.email;
	}

	public void setPassword(String password){
		this.password = password;
	}

	public String getPassword(){
		return this.password;
	}

	public void setLogintime(Date logintime){
		this.logintime = logintime;
	}

	public Date getLogintime(){
		return this.logintime;
	}

	public void setInvitationcode(String invitationcode){
		this.invitationcode = invitationcode;
	}

	public String getInvitationcode(){
		return this.invitationcode;
	}

	public void setState(Integer state){
		this.state = state;
	}

	public Integer getState(){
		return this.state;
	}

	@Override
	public String toString (){
		return "管理员用户:"+(email == null ? "空" : email)+"，管理员密码:"+(password == null ? "空" : password)+"，最后登录时间:"+(logintime == null ? "空" : DateUtil.format(logintime, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()))+"，邀请码:"+(invitationcode == null ? "空" : invitationcode)+"，用户状态，1：启用该管理员 0：禁用管理员:"+(state == null ? "空" : state);
	}
}
